<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <!-- <el-form-item label="审核标志" prop="auditMark">
        <el-select v-model="queryParams.auditMark" placeholder="请选择审核标志" clearable size="small">
          <el-option
            v-for="dict in auditMarkOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="关闭标志" prop="closingSigns">
        <el-select v-model="queryParams.closingSigns" placeholder="请选择关闭标志" clearable size="small">
          <el-option
            v-for="dict in closingSignsOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="单据编号" prop="documentNum">
        <el-input
          v-model="queryParams.documentNum"
          placeholder="请输入单据编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="打印次数 " prop="printingTimes">
        <el-input
          v-model="queryParams.printingTimes"
          placeholder="请输入打印次数 "
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="变更日期 " prop="changeDate">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.changeDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择变更日期 ">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="变更原因 
" prop="changeReason">
        <el-input
          v-model="queryParams.changeReason"
          placeholder="请输入变更原因 
"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="版本号 
" prop="versionNum">
        <el-input
          v-model="queryParams.versionNum"
          placeholder="请输入版本号 
"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="日期 

" prop="dates">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.dates"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择日期 

">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="制单日期 " prop="preparationDate">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.preparationDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择制单日期 ">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="审核日期" prop="auditDate">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.auditDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择审核日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="价税合计 " prop="priceTax">
        <el-input
          v-model="queryParams.priceTax"
          placeholder="请输入价税合计 "
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="关闭时间" prop="closingTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.closingTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择关闭时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="供应商 " prop="supplier">
        <el-input
          v-model="queryParams.supplier"
          placeholder="请输入供应商 "
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物料长代码" prop="goodsLcode">
        <el-input
          v-model="queryParams.goodsLcode"
          placeholder="请输入物料长代码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物料名称" prop="goodsName">
        <el-input
          v-model="queryParams.goodsName"
          placeholder="请输入物料名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="规格型号 " prop="goodsModel">
        <el-input
          v-model="queryParams.goodsModel"
          placeholder="请输入规格型号 "
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="数量 " prop="number">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.number"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择数量 ">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="变更人" prop="alterer">
        <el-input
          v-model="queryParams.alterer"
          placeholder="请输入变更人"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="对应代码" prop="coeerspondingCode">
        <el-input
          v-model="queryParams.coeerspondingCode"
          placeholder="请输入对应代码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="对应名称" prop="coeerspondingName">
        <el-input
          v-model="queryParams.coeerspondingName"
          placeholder="请输入对应名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="折扣额" prop="discountAmount">
        <el-input
          v-model="queryParams.discountAmount"
          placeholder="请输入折扣额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物料代码" prop="goodsCode">
        <el-input
          v-model="queryParams.goodsCode"
          placeholder="请输入物料代码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位" prop="unit">
        <el-input
          v-model="queryParams.unit"
          placeholder="请输入单位"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="关联数量" prop="associatedNum">
        <el-input
          v-model="queryParams.associatedNum"
          placeholder="请输入关联数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入库数量" prop="storageNum">
        <el-input
          v-model="queryParams.storageNum"
          placeholder="请输入入库数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="开票数量" prop="lnvoicedNum">
        <el-input
          v-model="queryParams.lnvoicedNum"
          placeholder="请输入开票数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="常用单位" prop="commonUnit">
        <el-input
          v-model="queryParams.commonUnit"
          placeholder="请输入常用单位"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助单位" prop="auxiliarryUnit">
        <el-input
          v-model="queryParams.auxiliarryUnit"
          placeholder="请输入辅助单位"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="换算率" prop="conbersionTare">
        <el-input
          v-model="queryParams.conbersionTare"
          placeholder="请输入换算率"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助数量" prop="auxiliaryNum">
        <el-input
          v-model="queryParams.auxiliaryNum"
          placeholder="请输入辅助数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="付款关联金额" prop="paymentAmount">
        <el-input
          v-model="queryParams.paymentAmount"
          placeholder="请输入付款关联金额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="币别" prop="currency">
        <el-select v-model="queryParams.currency" placeholder="请选择币别" clearable size="small">
          <el-option
            v-for="dict in currencyOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="收料数量" prop="receivingNum">
        <el-input
          v-model="queryParams.receivingNum"
          placeholder="请输入收料数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="退料数量" prop="returnNum">
        <el-input
          v-model="queryParams.returnNum"
          placeholder="请输入退料数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="汇率" prop="exchangeRate">
        <el-input
          v-model="queryParams.exchangeRate"
          placeholder="请输入汇率"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="主管" prop="director">
        <el-input
          v-model="queryParams.director"
          placeholder="请输入主管"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部门" prop="dept">
        <el-input
          v-model="queryParams.dept"
          placeholder="请输入部门"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="业务员" prop="salesman">
        <el-input
          v-model="queryParams.salesman"
          placeholder="请输入业务员"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="未收料数量" prop="notReceiveNum">
        <el-input
          v-model="queryParams.notReceiveNum"
          placeholder="请输入未收料数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单价" prop="unitPrice">
        <el-input
          v-model="queryParams.unitPrice"
          placeholder="请输入单价"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="折扣率" prop="discountRate">
        <el-input
          v-model="queryParams.discountRate"
          placeholder="请输入折扣率"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="未入库数量" prop="unstockQuantity">
        <el-input
          v-model="queryParams.unstockQuantity"
          placeholder="请输入未入库数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="制单" prop="voucher">
        <el-input
          v-model="queryParams.voucher"
          placeholder="请输入制单"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="税率" prop="taxRate">
        <el-input
          v-model="queryParams.taxRate"
          placeholder="请输入税率"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="金额" prop="money">
        <el-input
          v-model="queryParams.money"
          placeholder="请输入金额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核人" prop="reviewer">
        <el-input
          v-model="queryParams.reviewer"
          placeholder="请输入审核人"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="基本单位" prop="basicUnit">
        <el-input
          v-model="queryParams.basicUnit"
          placeholder="请输入基本单位"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="基本单位数量" prop="basicUnitNum">
        <el-input
          v-model="queryParams.basicUnitNum"
          placeholder="请输入基本单位数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="作废标志" prop="invalidSign">
        <el-select v-model="queryParams.invalidSign" placeholder="请选择作废标志" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item>
      <el-form-item label="供货机构" prop="supplyInstitutions">
        <el-input
          v-model="queryParams.supplyInstitutions"
          placeholder="请输入供货机构"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="合同单号" prop="contractNum">
        <el-input
          v-model="queryParams.contractNum"
          placeholder="请输入合同单号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="采购方式" prop="purchaseWay">
        <el-select v-model="queryParams.purchaseWay" placeholder="请选择采购方式" clearable size="small">
          <el-option
            v-for="dict in purchaseWayOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="基本单位关联数量" prop="basicunitNum">
        <el-input
          v-model="queryParams.basicunitNum"
          placeholder="请输入基本单位关联数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="基本单位入库数量" prop="basicunitQuantity">
        <el-input
          v-model="queryParams.basicunitQuantity"
          placeholder="请输入基本单位入库数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="结算方式" prop="payMethod">
        <el-select v-model="queryParams.payMethod" placeholder="请选择结算方式" clearable size="small">
          <el-option
            v-for="dict in payMethodOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="结算日期" prop="payDate">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.payDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择结算日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="摘要" prop="abstract">
        <el-input
          v-model="queryParams.abstract"
          placeholder="请输入摘要"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助属性" prop="auxiliaryAttribute">
        <el-input
          v-model="queryParams.auxiliaryAttribute"
          placeholder="请输入辅助属性"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助属性代码" prop="auxiliary attributesCode">
        <el-input
          v-model="queryParams.auxiliaryAttributesCode"
          placeholder="请输入辅助属性代码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="含税单价" prop="taxUnitPrice">
        <el-input
          v-model="queryParams.taxUnitPrice"
          placeholder="请输入含税单价"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="实际含税单价" prop="realTaxUnitPrice">
        <el-input
          v-model="queryParams.realTaxUnitPrice"
          placeholder="请输入实际含税单价"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="税额" prop="tax">
        <el-input
          v-model="queryParams.tax"
          placeholder="请输入税额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="是否手工行业务关闭" prop="isClosed">
        <el-input
          v-model="queryParams.isClosed"
          placeholder="请输入是否手工行业务关闭"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="锁单标记" prop="lockSingle">
        <el-input
          v-model="queryParams.lockSingle"
          placeholder="请输入锁单标记"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="严格跟单标记" prop="strictMark">
        <el-input
          v-model="queryParams.strictMark"
          placeholder="请输入严格跟单标记"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="补充库存标记" prop="replenishmentMark">
        <el-input
          v-model="queryParams.replenishmentMark"
          placeholder="请输入补充库存标记"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="基本单位开票数量" prop="unitInvoiceNum">
        <el-input
          v-model="queryParams.unitInvoiceNum"
          placeholder="请输入基本单位开票数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="行标志业关闭" prop="industryClosureSign">
        <el-input
          v-model="queryParams.industryClosureSign"
          placeholder="请输入行标志业关闭"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="常用单位数量" prop="commonUnitNum">
        <el-input
          v-model="queryParams.commonUnitNum"
          placeholder="请输入常用单位数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="交货日期" prop="deliveryDate">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.deliveryDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择交货日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="源单类型" prop="sourceType">
        <el-select v-model="queryParams.sourceType" placeholder="请选择源单类型" clearable size="small">
          <el-option
            v-for="dict in sourceTypeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="源单单号" prop="sourceCode">
        <el-input
          v-model="queryParams.sourceCode"
          placeholder="请输入源单单号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="计划模式" prop="planMode">
        <el-select v-model="queryParams.planMode" placeholder="请选择计划模式" clearable size="small">
          <el-option
            v-for="dict in planModeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="制单机构" prop="makeInstitution">
        <el-input
          v-model="queryParams.makeInstitution"
          placeholder="请输入制单机构"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="计划跟踪号" prop="planTrackNum">
        <el-input
          v-model="queryParams.planTrackNum"
          placeholder="请输入计划跟踪号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="采购范围" prop="procurementScope">
        <el-select v-model="queryParams.procurementScope" placeholder="请选择采购范围" clearable size="small">
          <el-option
            v-for="dict in procurementScopeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="辅助单位开票数量" prop="auxiliaryInvoiceNum">
        <el-input
          v-model="queryParams.auxiliaryInvoiceNum"
          placeholder="请输入辅助单位开票数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助单位入库数量" prop="auxiliaryWarehoseNum">
        <el-input
          v-model="queryParams.auxiliaryWarehoseNum"
          placeholder="请输入辅助单位入库数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="辅助单位关联数量" prop="auxiliaryAssociateNum">
        <el-input
          v-model="queryParams.auxiliaryAssociateNum"
          placeholder="请输入辅助单位关联数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="确认人" prop="confirmer">
        <el-input
          v-model="queryParams.confirmer"
          placeholder="请输入确认人"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="汇率类型" prop="currencyType">
        <el-select v-model="queryParams.currencyType" placeholder="请选择汇率类型" clearable size="small">
          <el-option
            v-for="dict in currencyTypeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="交货地点" prop="deliveryPlace">
        <el-input
          v-model="queryParams.deliveryPlace"
          placeholder="请输入交货地点"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="附件数" prop="attachmentNum">
        <el-input
          v-model="queryParams.attachmentNum"
          placeholder="请输入附件数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="表体附件数" prop="tableAttachmentNum">
        <el-input
          v-model="queryParams.tableAttachmentNum"
          placeholder="请输入表体附件数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="采购模式" prop="purchaseMode">
        <el-select v-model="queryParams.purchaseMode" placeholder="请选择采购模式" clearable size="small">
          <el-option
            v-for="dict in purchaseModeOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="基本单位收料数量" prop="basicUnitReceive">
        <el-input
          v-model="queryParams.basicUnitReceive"
          placeholder="请输入基本单位收料数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="基本单位退料数量" prop="basicUnitReturn">
        <el-input
          v-model="queryParams.basicUnitReturn"
          placeholder="请输入基本单位退料数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="拒绝意见" prop="refuseOpinion">
        <el-input
          v-model="queryParams.refuseOpinion"
          placeholder="请输入拒绝意见"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="驳回拒绝意见" prop="overruleRefusal">
        <el-input
          v-model="queryParams.overruleRefusal"
          placeholder="请输入驳回拒绝意见"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="检验方式" prop="termsInspection">
        <el-select v-model="queryParams.termsInspection" placeholder="请选择检验方式" clearable size="small">
          <el-option
            v-for="dict in termsInspectionOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="最新变更单编号" prop=" latestChangeCode">
        <el-input
          v-model="queryParams. latestChangeCode"
          placeholder="请输入最新变更单编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="关闭原因" prop="closeReson">
        <el-select v-model="queryParams.closeReson" placeholder="请选择关闭原因" clearable size="small">
          <el-option
            v-for="dict in closeResonOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="关闭人" prop="closer">
        <el-input
          v-model="queryParams.closer"
          placeholder="请输入关闭人"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="计划类别" prop="planCategory">
        <el-select v-model="queryParams.planCategory" placeholder="请选择计划类别" clearable size="small">
          <el-option
            v-for="dict in planCategoryOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="行业务关闭时间" prop="businessShutdownTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.businessShutdownTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择行业务关闭时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="行业务关闭原因" prop="businessShutdownReason">
        <el-select v-model="queryParams.businessShutdownReason" placeholder="请选择行业务关闭原因" clearable size="small">
          <el-option
            v-for="dict in businessShutdownReasonOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="行业务关闭人" prop="businessClosedPerson">
        <el-input
          v-model="queryParams.businessClosedPerson"
          placeholder="请输入行业务关闭人"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="助记码" prop="mnemonicCode">
        <el-input
          v-model="queryParams.mnemonicCode"
          placeholder="请输入助记码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="制单时间" prop="makeTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.makeTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择制单时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="编号" prop="identifier">
        <el-input
          v-model="queryParams.identifier"
          placeholder="请输入编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="打印次数" prop="printingNum">
        <el-input
          v-model="queryParams.printingNum"
          placeholder="请输入打印次数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="选单号" prop="menuNum">
        <el-input
          v-model="queryParams.menuNum"
          placeholder="请输入选单号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="行号" prop="lineNum">
        <el-input
          v-model="queryParams.lineNum"
          placeholder="请输入行号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="库存数量" prop="lnventoryNum">
        <el-input
          v-model="queryParams.lnventoryNum"
          placeholder="请输入库存数量"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item>
        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
          size="mini"
          @click="handleAd"
          v-hasPermi="['purchase:order:add']"
        >收货</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['purchase:order:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['purchase:order:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['purchase:order:export']"
        >导出</el-button>
      </el-col>
	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" :default-sort="{prop: 'date', order: 'descending'}">
      <el-table-column type="selection" width="55" align="center" />
      <!-- <el-table-column label="审核标志" align="center" prop="auditMark" :formatter="auditMarkFormat" sortable width="150"/>
      <el-table-column label="关闭标志" align="center" prop="closingSigns" :formatter="closingSignsFormat" sortable width="150"/> -->
      <el-table-column label="单据编号" align="center" prop="documentNum" sortable width="150"/>
      <!-- <el-table-column label="打印次数 " align="center" prop="printingTimes" sortable width="150"/>
      <el-table-column label="变更日期 " align="center" prop="changeDate" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.changeDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="变更原因 " align="center" prop="changeReason" sortable width="150"/>
      <el-table-column label="版本号 " align="center" prop="versionNum" sortable width="150"/>-->

       <!--<el-table-column label="制单日期 " align="center" prop="preparationDate" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.preparationDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="审核日期" align="center" prop="auditDate" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.auditDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
     <el-table-column label="价税合计 " align="center" prop="priceTax" sortable width="150"/>
      <el-table-column label="关闭时间" align="center" prop="closingTime" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.closingTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column> -->
      <el-table-column label="供应商 " align="center" prop="supplier" sortable width="150"/>
      <el-table-column label="物料长代码" align="center" prop="goodsLcode" sortable width="150"/>
      <el-table-column label="物料名称" align="center" prop="goodsName" sortable width="150"/>
      <el-table-column label="规格型号 " align="center" prop="goodsModel" sortable width="150"/>
      <el-table-column label="数量 " align="center" prop="number" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.number, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="单位" align="center" prop="unit" sortable width="150" />
            <el-table-column label="业务员" align="center" prop="salesman" sortable width="150"/>
                  <el-table-column label="日期 " align="center" prop="dates" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.dates, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
            <el-table-column label="摘要" align="center" prop="abstractt" sortable width="150"/>
            <el-table-column label="交货日期" align="center" prop="deliveryDate" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
           <el-table-column label="检验方式" align="center" prop="termsInspection" :formatter="termsInspectionFormat" sortable width="150"/>
           <el-table-column label="制单" align="center" prop="voucher" sortable width="150"/>
            <el-table-column label="审核人" align="center" prop="reviewer" sortable width="150"/>
      <!-- <el-table-column label="变更人" align="center" prop="alterer" sortable width="150"/>
      <el-table-column label="对应代码" align="center" prop="coeerspondingCode" sortable width="150"/>
      <el-table-column label="对应名称" align="center" prop="coeerspondingName" sortable width="150"/>
      <el-table-column label="折扣额" align="center" prop="discountAmount" sortable width="150"/>
      <el-table-column label="物料代码" align="center" prop="goodsCode" sortable width="150"/>
      
      <el-table-column label="关联数量" align="center" prop="associatedNum" sortable width="150"/>
      <el-table-column label="入库数量" align="center" prop="storageNum" sortable width="150"/>
      <el-table-column label="开票数量" align="center" prop="lnvoicedNum" sortable width="150"/>
      <el-table-column label="常用单位" align="center" prop="commonUnit" sortable width="150"/>
      <el-table-column label="辅助单位" align="center" prop="auxiliarryUnit" sortable width="150"/>
      <el-table-column label="换算率" align="center" prop="conbersionTare" sortable width="150"/>
      <el-table-column label="辅助数量" align="center" prop="auxiliaryNum" sortable width="150"/>
      <el-table-column label="付款关联金额" align="center" prop="paymentAmount" sortable width="150"/>
      <el-table-column label="币别" align="center" prop="currency" :formatter="currencyFormat" sortable width="150"/>
      <el-table-column label="收料数量" align="center" prop="receivingNum" sortable width="150"/>
      <el-table-column label="退料数量" align="center" prop="returnNum" sortable width="150"/>
      <el-table-column label="汇率" align="center" prop="exchangeRate" sortable width="150"/>
      <el-table-column label="主管" align="center" prop="director" sortable width="150"/>
      <el-table-column label="部门" align="center" prop="dept" sortable width="150"/> -->

      <!-- <el-table-column label="未收料数量" align="center" prop="notReceiveNum" sortable width="150"/>
      <el-table-column label="单价" align="center" prop="unitPrice" sortable width="150"/>
      <el-table-column label="折扣率" align="center" prop="discountRate" sortable width="150"/>
      <el-table-column label="未入库数量" align="center" prop="unstockQuantity" sortable width="150"/>

      <el-table-column label="税率" align="center" prop="taxRate" sortable width="150"/>
      <el-table-column label="金额" align="center" prop="money" sortable width="150"/>

      <el-table-column label="基本单位" align="center" prop="basicUnit" sortable width="150"/>
      <el-table-column label="基本单位数量" align="center" prop="basicUnitNum" sortable width="150"/>
      <el-table-column label="作废标志" align="center" prop="invalidSign" sortable width="150"/>
      <el-table-column label="供货机构" align="center" prop="supplyInstitutions" sortable width="150"/>
      <el-table-column label="合同单号" align="center" prop="contractNum" sortable width="150"/>
      <el-table-column label="采购方式" align="center" prop="purchaseWay" :formatter="purchaseWayFormat" sortable width="150"/>
      <el-table-column label="基本单位关联数量" align="center" prop="basicunitNum" sortable width="150"/>
      <el-table-column label="基本单位入库数量" align="center" prop="basicunitQuantity" sortable width="150"/>
      <el-table-column label="结算方式" align="center" prop="payMethod" :formatter="payMethodFormat" sortable width="150" />
      <el-table-column label="结算日期" align="center" prop="payDate" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.payDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column> -->

      <!-- <el-table-column label="辅助属性" align="center" prop="auxiliaryAttribute" sortable width="150"/>
      <el-table-column label="辅助属性代码" align="center" prop="auxiliaryAttributesCode" sortable width="150"/>
      <el-table-column label="含税单价" align="center" prop="taxUnitPrice" sortable width="150"/>
      <el-table-column label="实际含税单价" align="center" prop="realTaxUnitPrice" sortable width="150"/>
      <el-table-column label="税额" align="center" prop="tax" sortable width="150"/>
      <el-table-column label="是否手工行业务关闭" align="center" prop="isClosed" sortable width="150"/>
      <el-table-column label="锁单标记" align="center" prop="lockSingle" sortable width="150"/>
      <el-table-column label="严格跟单标记" align="center" prop="strictMark" sortable width="150"/>
      <el-table-column label="补充库存标记" align="center" prop="replenishmentMark" sortable width="150"/>
      <el-table-column label="基本单位开票数量" align="center" prop="unitInvoiceNum" sortable width="150"/>
      <el-table-column label="行标志业关闭" align="center" prop="industryClosureSign" sortable width="150"/>
      <el-table-column label="常用单位数量" align="center" prop="commonUnitNum" sortable width="150"/> -->

      <!-- <el-table-column label="源单类型" align="center" prop="sourceType" :formatter="sourceTypeFormat" sortable width="150"/>
      <el-table-column label="源单单号" align="center" prop="sourceCode" sortable width="150"/>
      <el-table-column label="备注" align="center" prop="remark" sortable width="150"/>
      <el-table-column label="计划模式" align="center" prop="planMode" :formatter="planModeFormat" sortable width="150"/>
      <el-table-column label="制单机构" align="center" prop="makeInstitution" sortable width="150"/>
      <el-table-column label="计划跟踪号" align="center" prop="planTrackNum" sortable width="150"/>
      <el-table-column label="采购范围" align="center" prop="procurementScope" :formatter="procurementScopeFormat" sortable width="150"/>
      <el-table-column label="辅助单位开票数量" align="center" prop="auxiliaryInvoiceNum" sortable width="150"/>
      <el-table-column label="辅助单位入库数量" align="center" prop="auxiliaryWarehoseNum" sortable width="150"/>
      <el-table-column label="辅助单位关联数量" align="center" prop="auxiliaryAssociateNum" sortable width="150"/>
      <el-table-column label="确认人" align="center" prop="confirmer" sortable width="150"/>
      <el-table-column label="汇率类型" align="center" prop="currencyType" :formatter="currencyTypeFormat" sortable width="150"/>
      <el-table-column label="交货地点" align="center" prop="deliveryPlace" sortable width="150"/>
      <el-table-column label="附件数" align="center" prop="attachmentNum" sortable width="150"/>
      <el-table-column label="表体附件数" align="center" prop="tableAttachmentNum" sortable width="150"/>
      <el-table-column label="采购模式" align="center" prop="purchaseMode" :formatter="purchaseModeFormat" sortable width="150"/>
      <el-table-column label="基本单位收料数量" align="center" prop="basicUnitReceive" sortable width="150"/>
      <el-table-column label="基本单位退料数量" align="center" prop="basicUnitReturn" sortable width="150"/>
      <el-table-column label="拒绝意见" align="center" prop="refuseOpinion" sortable width="150"/>
      <el-table-column label="驳回拒绝意见" align="center" prop="overruleRefusal" sortable width="150"/> -->

      <!-- <el-table-column label="最新变更单编号" align="center" prop="latestChangeCode" sortable width="150"/>
      <el-table-column label="关闭原因" align="center" prop="closeReson" :formatter="closeResonFormat" sortable width="150" />
      <el-table-column label="关闭人" align="center" prop="closer" sortable width="150"/>
      <el-table-column label="计划类别" align="center" prop="planCategory" :formatter="planCategoryFormat" sortable width="150"/>
      <el-table-column label="行业务关闭时间" align="center" prop="businessShutdownTime" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.businessShutdownTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="行业务关闭原因" align="center" prop="businessShutdownReason" :formatter="businessShutdownReasonFormat" sortable width="150"/>
      <el-table-column label="行业务关闭人" align="center" prop="businessClosedPerson" sortable width="150"/>
      <el-table-column label="助记码" align="center" prop="mnemonicCode" sortable width="150"/> -->
      <!-- <el-table-column label="制单时间" align="center" prop="makeTime" sortable width="150">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.makeTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="编号" align="center" prop="identifier" sortable width="150"/>
      <el-table-column label="打印次数" align="center" prop="printingNum" sortable width="150"/>
      <el-table-column label="选单号" align="center" prop="menuNum" sortable width="150"/>
      <el-table-column label="行号" align="center" prop="lineNum" sortable width="150"/>
      <el-table-column label="库存数量" align="center" prop="lnventoryNum" sortable width="150"/> -->
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['purchase:order:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['purchase:order:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改采购管理-采购订单对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="审核标志" prop="auditMark">
          <el-select v-model="form.auditMark" placeholder="请选择审核标志">
            <el-option
              v-for="dict in auditMarkOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="关闭标志" prop="closingSigns">
          <el-select v-model="form.closingSigns" placeholder="请选择关闭标志">
            <el-option
              v-for="dict in closingSignsOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="单据编号" prop="documentNum">
          <el-input v-model="form.documentNum" placeholder="请输入单据编号" />
        </el-form-item>
        <el-form-item label="打印次数 " prop="printingTimes">
          <el-input v-model="form.printingTimes" placeholder="请输入打印次数 " />
        </el-form-item>
        <el-form-item label="变更日期 " prop="changeDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.changeDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择变更日期 ">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="变更原因 
" prop="changeReason">
          <el-input v-model="form.changeReason" placeholder="请输入变更原因 
" />
        </el-form-item>
        <el-form-item label="版本号 
" prop="versionNum">
          <el-input v-model="form.versionNum" placeholder="请输入版本号 
" />
        </el-form-item>
        <el-form-item label="日期 

" prop="dates">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.dates"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择日期 

">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="制单日期 " prop="preparationDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.preparationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择制单日期 ">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="审核日期" prop="auditDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.auditDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择审核日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="价税合计 " prop="priceTax">
          <el-input v-model="form.priceTax" placeholder="请输入价税合计 " />
        </el-form-item>
        <el-form-item label="关闭时间" prop="closingTime">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.closingTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择关闭时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="供应商 " prop="supplier">
          <el-input v-model="form.supplier" placeholder="请输入供应商 " />
        </el-form-item>
        <el-form-item label="物料长代码" prop="goodsLcode">
          <el-input v-model="form.goodsLcode" placeholder="请输入物料长代码" />
        </el-form-item>
        <el-form-item label="物料名称" prop="goodsName">
          <el-input v-model="form.goodsName" placeholder="请输入物料名称" />
        </el-form-item>
        <el-form-item label="规格型号 " prop="goodsModel">
          <el-input v-model="form.goodsModel" placeholder="请输入规格型号 " />
        </el-form-item>
        <el-form-item label="数量 " prop="number">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.number"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择数量 ">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="变更人" prop="alterer">
          <el-input v-model="form.alterer" placeholder="请输入变更人" />
        </el-form-item>
        <el-form-item label="对应代码" prop="coeerspondingCode">
          <el-input v-model="form.coeerspondingCode" placeholder="请输入对应代码" />
        </el-form-item>
        <el-form-item label="对应名称" prop="coeerspondingName">
          <el-input v-model="form.coeerspondingName" placeholder="请输入对应名称" />
        </el-form-item>
        <el-form-item label="折扣额" prop="discountAmount">
          <el-input v-model="form.discountAmount" placeholder="请输入折扣额" />
        </el-form-item>
        <el-form-item label="物料代码" prop="goodsCode">
          <el-input v-model="form.goodsCode" placeholder="请输入物料代码" />
        </el-form-item>
        <el-form-item label="单位" prop="unit">
          <el-input v-model="form.unit" placeholder="请输入单位" />
        </el-form-item>
        <el-form-item label="关联数量" prop="associatedNum">
          <el-input v-model="form.associatedNum" placeholder="请输入关联数量" />
        </el-form-item>
        <el-form-item label="入库数量" prop="storageNum">
          <el-input v-model="form.storageNum" placeholder="请输入入库数量" />
        </el-form-item>
        <el-form-item label="开票数量" prop="lnvoicedNum">
          <el-input v-model="form.lnvoicedNum" placeholder="请输入开票数量" />
        </el-form-item>
        <el-form-item label="常用单位" prop="commonUnit">
          <el-input v-model="form.commonUnit" placeholder="请输入常用单位" />
        </el-form-item>
        <el-form-item label="辅助单位" prop="auxiliarryUnit">
          <el-input v-model="form.auxiliarryUnit" placeholder="请输入辅助单位" />
        </el-form-item>
        <el-form-item label="换算率" prop="conbersionTare">
          <el-input v-model="form.conbersionTare" placeholder="请输入换算率" />
        </el-form-item>
        <el-form-item label="辅助数量" prop="auxiliaryNum">
          <el-input v-model="form.auxiliaryNum" placeholder="请输入辅助数量" />
        </el-form-item>
        <el-form-item label="付款关联金额" prop="paymentAmount">
          <el-input v-model="form.paymentAmount" placeholder="请输入付款关联金额" />
        </el-form-item>
        <el-form-item label="币别" prop="currency">
          <el-select v-model="form.currency" placeholder="请选择币别">
            <el-option
              v-for="dict in currencyOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="收料数量" prop="receivingNum">
          <el-input v-model="form.receivingNum" placeholder="请输入收料数量" />
        </el-form-item>
        <el-form-item label="退料数量" prop="returnNum">
          <el-input v-model="form.returnNum" placeholder="请输入退料数量" />
        </el-form-item>
        <el-form-item label="汇率" prop="exchangeRate">
          <el-input v-model="form.exchangeRate" placeholder="请输入汇率" />
        </el-form-item>
        <el-form-item label="主管" prop="director">
          <el-input v-model="form.director" placeholder="请输入主管" />
        </el-form-item>
        <el-form-item label="部门" prop="dept">
          <el-input v-model="form.dept" placeholder="请输入部门" />
        </el-form-item>
        <el-form-item label="业务员" prop="salesman">
          <el-input v-model="form.salesman" placeholder="请输入业务员" />
        </el-form-item>
        <el-form-item label="未收料数量" prop="notReceiveNum">
          <el-input v-model="form.notReceiveNum" placeholder="请输入未收料数量" />
        </el-form-item>
        <el-form-item label="单价" prop="unitPrice">
          <el-input v-model="form.unitPrice" placeholder="请输入单价" />
        </el-form-item>
        <el-form-item label="折扣率" prop="discountRate">
          <el-input v-model="form.discountRate" placeholder="请输入折扣率" />
        </el-form-item>
        <el-form-item label="未入库数量" prop="unstockQuantity">
          <el-input v-model="form.unstockQuantity" placeholder="请输入未入库数量" />
        </el-form-item>
        <el-form-item label="制单" prop="voucher">
          <el-input v-model="form.voucher" placeholder="请输入制单" />
        </el-form-item>
        <el-form-item label="税率" prop="taxRate">
          <el-input v-model="form.taxRate" placeholder="请输入税率" />
        </el-form-item>
        <el-form-item label="金额" prop="money">
          <el-input v-model="form.money" placeholder="请输入金额" />
        </el-form-item>
        <el-form-item label="审核人" prop="reviewer">
          <el-input v-model="form.reviewer" placeholder="请输入审核人" />
        </el-form-item>
        <el-form-item label="基本单位" prop="basicUnit">
          <el-input v-model="form.basicUnit" placeholder="请输入基本单位" />
        </el-form-item>
        <el-form-item label="基本单位数量" prop="basicUnitNum">
          <el-input v-model="form.basicUnitNum" placeholder="请输入基本单位数量" />
        </el-form-item>
        <el-form-item label="作废标志" prop="invalidSign">
          <el-select v-model="form.invalidSign" placeholder="请选择作废标志">
            <el-option label="请选择字典生成" value="" />
          </el-select>
        </el-form-item>
        <el-form-item label="供货机构" prop="supplyInstitutions">
          <el-input v-model="form.supplyInstitutions" placeholder="请输入供货机构" />
        </el-form-item>
        <el-form-item label="合同单号" prop="contractNum">
          <el-input v-model="form.contractNum" placeholder="请输入合同单号" />
        </el-form-item>
        <el-form-item label="采购方式" prop="purchaseWay">
          <el-select v-model="form.purchaseWay" placeholder="请选择采购方式">
            <el-option
              v-for="dict in purchaseWayOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="基本单位关联数量" prop="basicunitNum">
          <el-input v-model="form.basicunitNum" placeholder="请输入基本单位关联数量" />
        </el-form-item>
        <el-form-item label="基本单位入库数量" prop="basicunitQuantity">
          <el-input v-model="form.basicunitQuantity" placeholder="请输入基本单位入库数量" />
        </el-form-item>
        <el-form-item label="结算方式" prop="payMethod">
          <el-select v-model="form.payMethod" placeholder="请选择结算方式">
            <el-option
              v-for="dict in payMethodOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="结算日期" prop="payDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.payDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择结算日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="摘要" prop="abstractt">
          <el-input v-model="form.abstractt" placeholder="请输入摘要" />
        </el-form-item>
        <el-form-item label="辅助属性" prop="auxiliaryAttribute">
          <el-input v-model="form.auxiliaryAttribute" placeholder="请输入辅助属性" />
        </el-form-item>
        <el-form-item label="辅助属性代码" prop="auxiliaryAttributesCode">
          <el-input v-model="form.auxiliaryAttributesCode" placeholder="请输入辅助属性代码" />
        </el-form-item>
        <el-form-item label="含税单价" prop="taxUnitPrice">
          <el-input v-model="form.taxUnitPrice" placeholder="请输入含税单价" />
        </el-form-item>
        <el-form-item label="实际含税单价" prop="realTaxUnitPrice">
          <el-input v-model="form.realTaxUnitPrice" placeholder="请输入实际含税单价" />
        </el-form-item>
        <el-form-item label="税额" prop="tax">
          <el-input v-model="form.tax" placeholder="请输入税额" />
        </el-form-item>
        <el-form-item label="是否手工行业务关闭" prop="isClosed">
          <el-input v-model="form.isClosed" placeholder="请输入是否手工行业务关闭" />
        </el-form-item>
        <el-form-item label="锁单标记" prop="lockSingle">
          <el-input v-model="form.lockSingle" placeholder="请输入锁单标记" />
        </el-form-item>
        <el-form-item label="严格跟单标记" prop="strictMark">
          <el-input v-model="form.strictMark" placeholder="请输入严格跟单标记" />
        </el-form-item>
        <el-form-item label="补充库存标记" prop="replenishmentMark">
          <el-input v-model="form.replenishmentMark" placeholder="请输入补充库存标记" />
        </el-form-item>
        <el-form-item label="基本单位开票数量" prop="unitInvoiceNum">
          <el-input v-model="form.unitInvoiceNum" placeholder="请输入基本单位开票数量" />
        </el-form-item>
        <el-form-item label="行标志业关闭" prop="industryClosureSign">
          <el-input v-model="form.industryClosureSign" placeholder="请输入行标志业关闭" />
        </el-form-item>
        <el-form-item label="常用单位数量" prop="commonUnitNum">
          <el-input v-model="form.commonUnitNum" placeholder="请输入常用单位数量" />
        </el-form-item>
        <el-form-item label="交货日期" prop="deliveryDate">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.deliveryDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择交货日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="源单类型" prop="sourceType">
          <el-select v-model="form.sourceType" placeholder="请选择源单类型">
            <el-option
              v-for="dict in sourceTypeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="源单单号" prop="sourceCode">
          <el-input v-model="form.sourceCode" placeholder="请输入源单单号" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="计划模式" prop="planMode">
          <el-select v-model="form.planMode" placeholder="请选择计划模式">
            <el-option
              v-for="dict in planModeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="制单机构" prop="makeInstitution">
          <el-input v-model="form.makeInstitution" placeholder="请输入制单机构" />
        </el-form-item>
        <el-form-item label="计划跟踪号" prop="planTrackNum">
          <el-input v-model="form.planTrackNum" placeholder="请输入计划跟踪号" />
        </el-form-item>
        <el-form-item label="采购范围" prop="procurementScope">
          <el-select v-model="form.procurementScope" placeholder="请选择采购范围">
            <el-option
              v-for="dict in procurementScopeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="辅助单位开票数量" prop="auxiliaryInvoiceNum">
          <el-input v-model="form.auxiliaryInvoiceNum" placeholder="请输入辅助单位开票数量" />
        </el-form-item>
        <el-form-item label="辅助单位入库数量" prop="auxiliaryWarehoseNum">
          <el-input v-model="form.auxiliaryWarehoseNum" placeholder="请输入辅助单位入库数量" />
        </el-form-item>
        <el-form-item label="辅助单位关联数量" prop="auxiliaryAssociateNum">
          <el-input v-model="form.auxiliaryAssociateNum" placeholder="请输入辅助单位关联数量" />
        </el-form-item>
        <el-form-item label="确认人" prop="confirmer">
          <el-input v-model="form.confirmer" placeholder="请输入确认人" />
        </el-form-item>
        <el-form-item label="汇率类型" prop="currencyType">
          <el-select v-model="form.currencyType" placeholder="请选择汇率类型">
            <el-option
              v-for="dict in currencyTypeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="交货地点" prop="deliveryPlace">
          <el-input v-model="form.deliveryPlace" placeholder="请输入交货地点" />
        </el-form-item>
        <el-form-item label="附件数" prop="attachmentNum">
          <el-input v-model="form.attachmentNum" placeholder="请输入附件数" />
        </el-form-item>
        <el-form-item label="表体附件数" prop="tableAttachmentNum">
          <el-input v-model="form.tableAttachmentNum" placeholder="请输入表体附件数" />
        </el-form-item>
        <el-form-item label="采购模式" prop="purchaseMode">
          <el-select v-model="form.purchaseMode" placeholder="请选择采购模式">
            <el-option
              v-for="dict in purchaseModeOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="基本单位收料数量" prop="basicUnitReceive">
          <el-input v-model="form.basicUnitReceive" placeholder="请输入基本单位收料数量" />
        </el-form-item>
        <el-form-item label="基本单位退料数量" prop="basicUnitReturn">
          <el-input v-model="form.basicUnitReturn" placeholder="请输入基本单位退料数量" />
        </el-form-item>
        <el-form-item label="拒绝意见" prop="refuseOpinion">
          <el-input v-model="form.refuseOpinion" placeholder="请输入拒绝意见" />
        </el-form-item>
        <el-form-item label="驳回拒绝意见" prop="overruleRefusal">
          <el-input v-model="form.overruleRefusal" placeholder="请输入驳回拒绝意见" />
        </el-form-item>
        <el-form-item label="检验方式" prop="termsInspection">
          <el-select v-model="form.termsInspection" placeholder="请选择检验方式">
            <el-option
              v-for="dict in termsInspectionOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="最新变更单编号" prop="latestChangeCode">
          <el-input v-model="form.latestChangeCode" placeholder="请输入最新变更单编号" />
        </el-form-item>
        <el-form-item label="关闭原因" prop="closeReson">
          <el-select v-model="form.closeReson" placeholder="请选择关闭原因">
            <el-option
              v-for="dict in closeResonOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="关闭人" prop="closer">
          <el-input v-model="form.closer" placeholder="请输入关闭人" />
        </el-form-item>
        <el-form-item label="计划类别" prop="planCategory">
          <el-select v-model="form.planCategory" placeholder="请选择计划类别">
            <el-option
              v-for="dict in planCategoryOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="行业务关闭时间" prop="businessShutdownTime">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.businessShutdownTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择行业务关闭时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="行业务关闭原因" prop="businessShutdownReason">
          <el-select v-model="form.businessShutdownReason" placeholder="请选择行业务关闭原因">
            <el-option
              v-for="dict in businessShutdownReasonOptions"
              :key="dict.dictValue"
              :label="dict.dictLabel"
              :value="parseInt(dict.dictValue)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="行业务关闭人" prop="businessClosedPerson">
          <el-input v-model="form.businessClosedPerson" placeholder="请输入行业务关闭人" />
        </el-form-item>
        <el-form-item label="助记码" prop="mnemonicCode">
          <el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
        </el-form-item>
        <el-form-item label="制单时间" prop="makeTime">
          <el-date-picker clearable size="small" style="width: 200px"
            v-model="form.makeTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择制单时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="编号" prop="identifier">
          <el-input v-model="form.identifier" placeholder="请输入编号" />
        </el-form-item>
        <el-form-item label="打印次数" prop="printingNum">
          <el-input v-model="form.printingNum" placeholder="请输入打印次数" />
        </el-form-item>
        <el-form-item label="选单号" prop="menuNum">
          <el-input v-model="form.menuNum" placeholder="请输入选单号" />
        </el-form-item>
        <el-form-item label="行号" prop="lineNum">
          <el-input v-model="form.lineNum" placeholder="请输入行号" />
        </el-form-item>
        <el-form-item label="库存数量" prop="lnventoryNum">
          <el-input v-model="form.lnventoryNum" placeholder="请输入库存数量" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/purchase/order";

export default {
  name: "Order",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 采购管理-采购订单表格数据
      orderList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 审核标志字典
      auditMarkOptions: [],
      // 关闭标志字典
      closingSignsOptions: [],
      // 币别字典
      currencyOptions: [],
      // 采购方式字典
      purchaseWayOptions: [],
      // 结算方式字典
      payMethodOptions: [],
      // 源单类型字典
      sourceTypeOptions: [],
      // 计划模式字典
      planModeOptions: [],
      // 采购范围字典
      procurementScopeOptions: [],
      // 汇率类型字典
      currencyTypeOptions: [],
      // 采购模式字典
      purchaseModeOptions: [],
      // 检验方式字典
      termsInspectionOptions: [],
      // 关闭原因字典
      closeResonOptions: [],
      // 计划类别字典
      planCategoryOptions: [],
      // 行业务关闭原因字典
      businessShutdownReasonOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        auditMark: undefined,
        closingSigns: undefined,
        documentNum: undefined,
        printingTimes: undefined,
        changeDate: undefined,
        changeReason: undefined,
        versionNum: undefined,
        dates: undefined,
        preparationDate: undefined,
        auditDate: undefined,
        priceTax: undefined,
        closingTime: undefined,
        supplier: undefined,
        goodsLcode: undefined,
        goodsName: undefined,
        goodsModel: undefined,
        number: undefined,
        alterer: undefined,
        coeerspondingCode: undefined,
        coeerspondingName: undefined,
        discountAmount: undefined,
        goodsCode: undefined,
        unit: undefined,
        associatedNum: undefined,
        storageNum: undefined,
        lnvoicedNum: undefined,
        commonUnit: undefined,
        auxiliarryUnit: undefined,
        conbersionTare: undefined,
        auxiliaryNum: undefined,
        paymentAmount: undefined,
        currency: undefined,
        receivingNum: undefined,
        returnNum: undefined,
        exchangeRate: undefined,
        director: undefined,
        dept: undefined,
        salesman: undefined,
        notReceiveNum: undefined,
        unitPrice: undefined,
        discountRate: undefined,
        unstockQuantity: undefined,
        voucher: undefined,
        taxRate: undefined,
        money: undefined,
        reviewer: undefined,
        basicUnit: undefined,
        basicUnitNum: undefined,
        invalidSign: undefined,
        supplyInstitutions: undefined,
        contractNum: undefined,
        purchaseWay: undefined,
        basicunitNum: undefined,
        basicunitQuantity: undefined,
        payMethod: undefined,
        payDate: undefined,
        abstractt: undefined,
        auxiliaryAttribute: undefined,
        auxiliaryAttributesCode: undefined,
        taxUnitPrice: undefined,
        realTaxUnitPrice: undefined,
        tax: undefined,
        isClosed: undefined,
        lockSingle: undefined,
        strictMark: undefined,
        replenishmentMark: undefined,
        unitInvoiceNum: undefined,
        industryClosureSign: undefined,
        commonUnitNum: undefined,
        deliveryDate: undefined,
        sourceType: undefined,
        sourceCode: undefined,
        planMode: undefined,
        makeInstitution: undefined,
        planTrackNum: undefined,
        procurementScope: undefined,
        auxiliaryInvoiceNum: undefined,
        auxiliaryWarehoseNum: undefined,
        auxiliaryAssociateNum: undefined,
        confirmer: undefined,
        currencyType: undefined,
        deliveryPlace: undefined,
        attachmentNum: undefined,
        tableAttachmentNum: undefined,
        purchaseMode: undefined,
        basicUnitReceive: undefined,
        basicUnitReturn: undefined,
        refuseOpinion: undefined,
        overruleRefusal: undefined,
        termsInspection: undefined,
        latestChangeCode: undefined,
        closeReson: undefined,
        closer: undefined,
        planCategory: undefined,
        businessShutdownTime: undefined,
        businessShutdownReason: undefined,
        businessClosedPerson: undefined,
        mnemonicCode: undefined,
        makeTime: undefined,
        identifier: undefined,
        printingNum: undefined,
        menuNum: undefined,
        lineNum: undefined,
        lnventoryNum: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
    this.getDicts("prodplan_feeding_audit_mark").then(response => {
      this.auditMarkOptions = response.data;
    });
    this.getDicts("purchase_order_closing_signs").then(response => {
      this.closingSignsOptions = response.data;
    });
    this.getDicts("purchase_order_currency").then(response => {
      this.currencyOptions = response.data;
    });
    this.getDicts("purchase_order_purchase_way").then(response => {
      this.purchaseWayOptions = response.data;
    });
    this.getDicts("purchase_order_pay_method").then(response => {
      this.payMethodOptions = response.data;
    });
    this.getDicts("purchase_order_source_type").then(response => {
      this.sourceTypeOptions = response.data;
    });
    this.getDicts("terms_inspection_plan_mode").then(response => {
      this.planModeOptions = response.data;
    });
    this.getDicts("purchase_order_procurement_scope").then(response => {
      this.procurementScopeOptions = response.data;
    });
    this.getDicts("purchase_order_currency_type").then(response => {
      this.currencyTypeOptions = response.data;
    });
    this.getDicts("purchase_order_purchase_mode").then(response => {
      this.purchaseModeOptions = response.data;
    });
    this.getDicts("purchase_order_terms_inspection").then(response => {
      this.termsInspectionOptions = response.data;
    });
    this.getDicts("purchase_order_close_reson").then(response => {
      this.closeResonOptions = response.data;
    });
    this.getDicts("purchase_order_plan_category").then(response => {
      this.planCategoryOptions = response.data;
    });
    this.getDicts("purchase_order_business_shutdown_reason").then(response => {
      this.businessShutdownReasonOptions = response.data;
    });
  },
  methods: {
    /** 查询采购管理-采购订单列表 */
    getList() {
      this.loading = true;
      listOrder(this.queryParams).then(response => {
        this.orderList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 审核标志字典翻译
    auditMarkFormat(row, column) {
      return this.selectDictLabel(this.auditMarkOptions, row.auditMark);
    },
    // 关闭标志字典翻译
    closingSignsFormat(row, column) {
      return this.selectDictLabel(this.closingSignsOptions, row.closingSigns);
    },
    // 币别字典翻译
    currencyFormat(row, column) {
      return this.selectDictLabel(this.currencyOptions, row.currency);
    },
    // 采购方式字典翻译
    purchaseWayFormat(row, column) {
      return this.selectDictLabel(this.purchaseWayOptions, row.purchaseWay);
    },
    // 结算方式字典翻译
    payMethodFormat(row, column) {
      return this.selectDictLabel(this.payMethodOptions, row.payMethod);
    },
    // 源单类型字典翻译
    sourceTypeFormat(row, column) {
      return this.selectDictLabel(this.sourceTypeOptions, row.sourceType);
    },
    // 计划模式字典翻译
    planModeFormat(row, column) {
      return this.selectDictLabel(this.planModeOptions, row.planMode);
    },
    // 采购范围字典翻译
    procurementScopeFormat(row, column) {
      return this.selectDictLabel(this.procurementScopeOptions, row.procurementScope);
    },
    // 汇率类型字典翻译
    currencyTypeFormat(row, column) {
      return this.selectDictLabel(this.currencyTypeOptions, row.currencyType);
    },
    // 采购模式字典翻译
    purchaseModeFormat(row, column) {
      return this.selectDictLabel(this.purchaseModeOptions, row.purchaseMode);
    },
    // 检验方式字典翻译
    termsInspectionFormat(row, column) {
      return this.selectDictLabel(this.termsInspectionOptions, row.termsInspection);
    },
    // 关闭原因字典翻译
    closeResonFormat(row, column) {
      return this.selectDictLabel(this.closeResonOptions, row.closeReson);
    },
    // 计划类别字典翻译
    planCategoryFormat(row, column) {
      return this.selectDictLabel(this.planCategoryOptions, row.planCategory);
    },
    // 行业务关闭原因字典翻译
    businessShutdownReasonFormat(row, column) {
      return this.selectDictLabel(this.businessShutdownReasonOptions, row.businessShutdownReason);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        orderId: undefined,
        auditMark: undefined,
        closingSigns: undefined,
        documentNum: undefined,
        printingTimes: undefined,
        changeDate: undefined,
        changeReason: undefined,
        versionNum: undefined,
        dates: undefined,
        preparationDate: undefined,
        auditDate: undefined,
        priceTax: undefined,
        closingTime: undefined,
        supplier: undefined,
        goodsLcode: undefined,
        goodsName: undefined,
        goodsModel: undefined,
        number: undefined,
        alterer: undefined,
        coeerspondingCode: undefined,
        coeerspondingName: undefined,
        discountAmount: undefined,
        goodsCode: undefined,
        unit: undefined,
        associatedNum: undefined,
        storageNum: undefined,
        lnvoicedNum: undefined,
        commonUnit: undefined,
        auxiliarryUnit: undefined,
        conbersionTare: undefined,
        auxiliaryNum: undefined,
        paymentAmount: undefined,
        currency: undefined,
        receivingNum: undefined,
        returnNum: undefined,
        exchangeRate: undefined,
        director: undefined,
        dept: undefined,
        salesman: undefined,
        notReceiveNum: undefined,
        unitPrice: undefined,
        discountRate: undefined,
        unstockQuantity: undefined,
        voucher: undefined,
        taxRate: undefined,
        money: undefined,
        reviewer: undefined,
        basicUnit: undefined,
        basicUnitNum: undefined,
        invalidSign: undefined,
        supplyInstitutions: undefined,
        contractNum: undefined,
        purchaseWay: undefined,
        basicunitNum: undefined,
        basicunitQuantity: undefined,
        payMethod: undefined,
        payDate: undefined,
        abstractt: undefined,
        auxiliaryAttribute: undefined,
        auxiliaryAttributesCode: undefined,
        taxUnitPrice: undefined,
        realTaxUnitPrice: undefined,
        tax: undefined,
        isClosed: undefined,
        lockSingle: undefined,
        strictMark: undefined,
        replenishmentMark: undefined,
        unitInvoiceNum: undefined,
        industryClosureSign: undefined,
        commonUnitNum: undefined,
        deliveryDate: undefined,
        sourceType: undefined,
        sourceCode: undefined,
        remark: undefined,
        planMode: undefined,
        makeInstitution: undefined,
        planTrackNum: undefined,
        procurementScope: undefined,
        auxiliaryInvoiceNum: undefined,
        auxiliaryWarehoseNum: undefined,
        auxiliaryAssociateNum: undefined,
        confirmer: undefined,
        currencyType: undefined,
        deliveryPlace: undefined,
        attachmentNum: undefined,
        tableAttachmentNum: undefined,
        purchaseMode: undefined,
        basicUnitReceive: undefined,
        basicUnitReturn: undefined,
        refuseOpinion: undefined,
        overruleRefusal: undefined,
        termsInspection: undefined,
        latestChangeCode: undefined,
        closeReson: undefined,
        closer: undefined,
        planCategory: undefined,
        businessShutdownTime: undefined,
        businessShutdownReason: undefined,
        businessClosedPerson: undefined,
        mnemonicCode: undefined,
        makeTime: undefined,
        identifier: undefined,
        printingNum: undefined,
        menuNum: undefined,
        lineNum: undefined,
        lnventoryNum: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.orderId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加采购管理-采购订单";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const orderId = row.orderId || this.ids
      getOrder(orderId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改采购管理-采购订单";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.orderId != null) {
            updateOrder(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addOrder(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const orderIds = row.orderId || this.ids;
      this.$confirm('是否确认删除采购管理-采购订单编号为"' + orderIds + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delOrder(orderIds);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有采购管理-采购订单数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return exportOrder(queryParams);
        }).then(response => {
          this.download(response.msg);
        })
    }
  }
};
</script>
